/**
 * @file        main.cpp
 * @brief       gtdshell entry point.
 *
 * @author      Emre Turkay <emreturkay at gmail>
 * @date        May.30.2008
 */

#include "application.hpp"
#include "interface.hpp"
#include "storage.hpp"
#include "gtd.hpp"

#include <cstdlib>

int main()
{
	try
	{
		gtd::gtd backend;
		gtd::storage storage(backend);
		interface intf;
		application app(intf, backend);

		storage.load();
		app.run();
		storage.save();
	}
	catch (std::exception& e)
	{
		std::cerr << "Exception occurred: " << e.what() << std::endl;
		throw;
	}
}
